Implementation and Application of Compensation Algorithm for Flow Characteristics of Regulating Valves

  • 4358 Views
  • 2014-07-08
0 Introduction
The control valve is widely used as the executive component of the steam and water flow control system. Its working performance directly affects the quality of control. Due to the different installation methods of the control valve in different use occasions, the changes in the structure of the Plumbing and the different working media, the operating conditions of the control valve change greatly, resulting in a significant reduction in the pressure drop ratio. At this time, the working flow characteristics of the valve differ greatly from its inherent characteristics, causing characteristic distortion, This distortion brings difficulties to the design of the control system and can seriously affect the performance indicators of the control system. The algorithm for compensating the flow characteristics of the regulating valve is the key to achieving flow characteristics compensation.

The development direction of regulating valves is modularity, miniaturization, intelligence, bus type, and standardization. In China, the compensation for the flow characteristics of regulating valves mainly adopts controllers designed specifically for regulating valves. Studying the compensation module for the flow characteristics of regulating valves is in line with the development direction of regulating valve technology and has practical application value.

Flow characteristics and application of 1 regulating valve
1.1 Definition
The flow characteristic of a regulating valve refers to the relationship between the relative flow rate of the medium flowing through the regulating valve and the relative displacement (i.e. the relative opening of the valve). The mathematical expression is:

(1)In the formula: Q/Qmax - relative flow rate, the ratio of flow rate Q at a certain opening of the regulating valve to flow rate Qmax at full opening;
L/L - relative displacement, the ratio of valve core displacement l at a certain opening of the regulating valve to valve core displacement L at full opening.

1.2 Ideal flow characteristics
The so-called ideal flow characteristic refers to the flow characteristic when the difference between the front and back of the regulating valve is certain. It is the inherent characteristic of the regulating valve and is determined by the shape of the valve core. The ideal flow characteristics mainly include four types: equal percentage, parabola, straight line, and fast opening (Figure 1).

Figure 1 Ideal Flow Characteristic Curve

The linear flow characteristic refers to the linear relationship between the relative flow rate and relative displacement of the regulating valve, which means that the change in relative flow rate caused by a change in unit relative stroke is a constant.

The numerical expression for linear flow characteristics is:

(2)The equal percentage flow characteristic (logarithmic flow characteristic) refers to the proportional relationship between the relative flow change caused by the change in unit relative displacement and the relative flow at this point. Using a numerical expression:

(3)The parabolic flow characteristic refers to the proportional relationship between the change in relative flow rate caused by the change in unit relative displacement and the square root of the relative flow rate value at this point. This characteristic lies between the linear characteristic and the equal percentage characteristic, and is often replaced by the equal percentage characteristic. Its mathematical expression is:

(4)The fast opening flow characteristic refers to the fact that the regulating valve has a large flow rate when the opening is small, and as the opening increases, the flow rate quickly reaches a large level; Afterwards, increase the opening again, and the flow rate changes very little. The mathematical expression is:

(5)

1.3 Adjustable ratio of regulating valve

The adjustable ratio R of the regulating valve refers to the ratio of the larger flow rate Qmax and the minimum flow rate Qmin that the regulating valve can control, i.e






R=Qmax/Qmin (6)






Generally, Qmin is 2% to 4% of the larger flow rate, so the ideal adjustable ratio range is between 25 and 50. The adjustable ratio reflects the size of the adjustment ability, so it is better to have a larger adjustable ratio. However, due to the limitations of valve core structure design and processing, the ideal adjustable ratio is generally not too large. Currently, there are only 30 and 50 ideal adjustable ratios for regulating valves in China.






In order to better study the flow characteristic curve of the regulating valve and make it more intuitive to analyze the distortion curve after correction, the ideal flow characteristic data corresponding to R taking 30 are listed below for reference (Table 1 and Figure 2).






Table 1 Relative opening and corresponding flow rate of flow characteristics (R=30)














Figure 2: Four Ideal Flow Characteristic Curves Corresponding to R=30






2. Introduction to Compensation Algorithms






The flow characteristic compensation algorithm of this design is based on the principle of Dichotomy to find the zero point. The principle of Dichotomy to find the zero point is: for an equation of f (x)=0 that must have a solution, the function of y=f (x) can be constructed. If y1=f (x1) < 0, y2=f (x2) > 0, then (x1, y1), (x2, y2) two points are taken as straight lines, intersecting one point (x3, 0) of the x-axis. If y3=f (x3) > 0, then (x1, y1), (x3, y3) two points are taken as straight lines, Otherwise, make a straight line with two points (x3, y3) and (x2, y2), intersecting at a point on the x-axis (x4, 0), and repeat the above steps until | yi=f (xi) -0 | reaches the required accuracy range. At this time, the value of xi is the solution of f (x)=0. The introduction of Dichotomy zeroing is to let the reader better understand the compensation algorithm. The algorithm is described in detail below in combination with Figure 3:






1) Initialize LH=Lmax (maximum opening reached by the valve), LL=Lmin (minimum opening reached by the valve), QH=Qmax (maximum flow reached by the flowmeter, generally corresponding to the maximum opening), QL=Qmin (minimum flow reached by the flowmeter, generally corresponding to the minimum opening).






2) Collect the given valve opening value L0, calculate the ideal flow value Q0 that should be achieved based on the saved ideal flow characteristic function, output L0, and collect the actual flow value Q1 through the flow meter.






3) If | Q1 Q0 |>error (the error value determines the accuracy achieved by compensation, depending on the actual situation), then proceed to step 4, otherwise compensation will be skipped.






4) If Q1>Q0, then LH=L0, QH=Q1, otherwise LL=L0, QL=Q1, calculate the formula:










Output L1 and collect the actual flow value Q1 through the flow meter.






5) Return to step (3). The algorithm will cycle through steps (3), (4), and (5) until the difference between Q1 and Q0 is less than the preset value rand to complete compensation (Figure 3).










Figure 3 Implementation and Application of Compensation Algorithm






The algorithm in this design is implemented using MATLAB, and some routines of the algorithm will be introduced below.






3.1 Calculate the compensation function for the ideal flow characteristic value corresponding to a certain point






Function [L, sum]=dotdeclaration (l)






This function is used to compensate for a certain opening. The input parameter is the opening value (percentage) to be compensated, and the return parameter is the actual output opening value (percentage) after compensation and the number of operations to be compensated at that point. Changing f1 and f2 can change the ideal flow characteristics and actual flow characteristics. There are many drawing operations in the function to facilitate the observation of the compensation process during simulation analysis.






As shown in Figure 4, [Lsum]=dotcomparison function, first define the ideal traffic characteristic function:










Figure 4 Compensation process with a valve opening of 30






F1=exp (x (i) -1) * log (R)) (R is the ideal adjustable ratio), and the actual flow characteristic function is:






F2=1/R+(1-1/R) * x (i)






At this point, the ideal flow rate is logarithmic, while the actual flow rate is linear,






When l=30, [Lsum]=[6.1206 1] is obtained.






3.2 Calculate the compensation function for the flow characteristics across the entire area






Function [L, sum]=linecompensation (float)






This compensation function compensates for the entire area, thus observing the overall effect of the compensation. The input parameter of this compensation function is the accuracy achieved by the compensation, such as 0.05. The difference between the ideal flow rate and the ideal flow rate of the compensation effect does not exceed 0.05. The output parameter is two sets of numbers, with L being the actual output opening after compensation at integer points 0 to 100, and sum being the number of operations for compensating these points.






Taking the distortion function as a Concave function as an example, the function expression of the ideal flow characteristic curve is:






F1=1/R+(1-1/R) * x






The function of the actual flow characteristic curve is






F2=1/R * (1+(sqrt (R) -1) * x) ^ 2 (Concave function), analyze the compensation process in this case, when float=0.05, as shown in Figure 5.










Figure 5 Flow characteristic compensation with an accuracy of 0.05






4 Summary






This design provides a detailed introduction to the research on flow compensation algorithms. Whether in daily life or industrial production, regulating valves are widely used, and it is difficult to avoid the problem of flow characteristic distortion during use. Therefore, the research on flow characteristic compensation algorithms is very meaningful. This algorithm has the following characteristics:






1) Easy to program, flexible, and highly portable;






2) It can effectively correct various flow distortion characteristics and adapt to the complex and ever-changing conditions of industrial sites;






3) This algorithm can not only correct the distortion of the flow characteristic curve of the regulating valve, but also work on the flow characteristic curve designed according to special needs;






4) The accuracy is adjustable, but the higher the accuracy, the longer the compensation time, depending on the specific situation.






At the same time, this algorithm also has shortcomings, such as having certain requirements for flow collection. When the regulating valve is in use, the signal collected by the flow will fluctuate. At the same time, when the valve acts, it takes a certain time, such as 3 to 6 seconds, to achieve stable flow, which seriously affects the compensation time. To solve this problem, a table lookup method can be combined. When the flow is stable, some valve opening and corresponding flow values can be stored in advance, These data can be used in the next compensation to minimize the compensation time as much as possible. This design belongs to simulation research and has not undergone actual testing. There may still be some problems in actual use, which are reserved for further research.






Transferred from Global Valve Network